package cn.tedu.baidashi.mapper;


import cn.tedu.baidashi.model.Province;
import cn.tedu.baidashi.vo.ProvinceVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* <p>
    *  Mapper 接口
    * </p>
*
* @author tedu.cn
* @since 2022-02-16
*/
    @Repository
    public interface ProvinceMapper extends BaseMapper<Province> {
    @Select("SELECT * FROM province ORDER BY id  ")
    List<ProvinceVo> getProvinceNames();
    @Select("SELECT province.province_name FROM province WHERE province.id=#{id}")
    ProvinceVo selectProvinceNameById(Integer id);
}
